package com.zyh.service.impl;

import com.zyh.entity.Category;
import com.zyh.mapper.CategoryMapper;
import com.zyh.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;

    @Override
    public List<Category> selectAll() {
        return categoryMapper.selectAll();
    }

    @Override
    public List<Category> selectCateByLevelOne(Integer cId) {
        return categoryMapper.selectCateByLevelOne(cId);
    }

    @Override
    public List<Category> selectCateByLevelTwo(Integer cId) {
        return categoryMapper.selectCateByLevelTwo(cId);
    }

    @Override
    public Category selectParentId(Integer cId) {
        return categoryMapper.selectParentId(cId);
    }
}
